-----------------------------------
-- Area: Bastok_Mines
-- NPC: Mille
-- Type: Regional Merchant NPC
-- @zone 234
-- @pos -57.697 0.000 39.451
-- Notes: Only sells when Bastok
-- controls Norvallen Region
-----------------------------------
package.loaded["scripts/zones/Bastok_Mines/TextIDs"] = nil;
-----------------------------------

require("scripts/globals/harvest_festivals");
require("scripts/globals/shop");
require("scripts/globals/conquest");
require("scripts/zones/Bastok_Mines/TextIDs");

-----------------------------------
-- onTrade Action
-----------------------------------

function onTrade(player,npc,trade)
	onHalloweenTrade(player,trade,npc)
end;

-----------------------------------
-- onTrigger Action
-----------------------------------

function onTrigger(player,npc)
	local  RegionOwner = GetRegionOwner(NORVALLEN);
	if (RegionOwner ~= BASTOK) then
		player:showText(npc,MILLE_CLOSED_DIALOG);
	else
		player:showText(npc,MILLE_OPEN_DIALOG);

		local stock = 
		{
			0x02b0,  18,     -- Arrowwood Log
			0x02ba,  88,     -- Ash Log
			0x026a,  25,     -- Blue Peas
			0x026d,  25      -- Crying Mustard
		}
		showShop(player,BASTOK,stock);

	end

end;

-----------------------------------
-- onEventUpdate
-----------------------------------

function onEventUpdate(player,csid,option)
	-- printf("CSID: %u",csid);
	-- printf("RESULT: %u",option);
end;

-----------------------------------
-- onEventFinish
-----------------------------------

function onEventFinish(player,csid,option)
	-- printf("CSID: %u",csid);
	-- printf("RESULT: %u",option);
end;
